﻿using AutoMapper;
using KWT.DRG_DIP.DO.QC;
using KWT.DRG_DIP.DTO.Group;
using KWT.DRG_DIP.DTO.Settlement.List;
using KWT.DRG_DIP.PO.Basic;
using KWT.DRG_DIP.PO.QC;
using KWT.DRG_DIP.PO.Settlement;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace KWT.DRG_DIP.Mapper.Settlement
{
    public class SysListMapper : Profile
    {
        public SysListMapper()
        {
            CreateMap<List_BasicInfo, BasicInfo>().ReverseMap();
            CreateMap<List_SepcialDiagInfo, SpecialDiagInfo>().ReverseMap();
            CreateMap<List_DiagInfo, DiagInfo>().ReverseMap();
            CreateMap<DiagInfo_Item, DiagInfoItem>().ReverseMap();
            CreateMap<DiagInfo_OperItem, DiagInfoOperItem>().ReverseMap();
            CreateMap<List_ChargeInfo, ChargeInfo>().ReverseMap();
            CreateMap<ChargeInfo_Item, ChargeInfoItem>().ReverseMap();
            CreateMap<List_PersonInfo, PersonInfo>().ReverseMap();
            CreateMap<List_Suggest, SuggestInfo>().ReverseMap();
            CreateMap<QC_Err_Item, QCInfo>().ReverseMap();
            CreateMap<OutGroupBenchmark, OutGpResult>()
                .ForMember(d => d.socre, opt => opt.MapFrom(s => s.Score))
                .ForMember(d => d.specialLabels, opt => opt.MapFrom(s => s.SpecialFlag))
                .ForMember(d => d.daysBenchmark, opt => opt.MapFrom(s => s.ZYTSBGZ))
                .ForMember(d => d.rateUp, opt => opt.MapFrom(s => s.HighMag))
                .ForMember(d => d.rateDownn, opt => opt.MapFrom(s => s.LowMag))
                .ReverseMap();
            CreateMap<OutGroupBenchmark, Sys_DIP_Para>().ReverseMap();
            CreateMap<OutGroupBenchmark, Sys_DRG_Para>()
                 .ForMember(d => d.DRG_Code, opt => opt.MapFrom(s => s.Disease_Code))
                 .ForMember(d => d.DRG_Name, opt => opt.MapFrom(s => s.Disease_Name))
                 .ReverseMap();
            CreateMap<InAddOrUpdate, WT4>()
                    .ForMember(d => d.YLFKFS, opt => opt.MapFrom(s => s.BasicInfo.InsureType.ToString()))
                    .ForMember(d => d.JKKH, opt => opt.MapFrom(s => s.Head.CardNo))
                    .ForMember(d => d.ZYCS, opt => opt.MapFrom(s => s.DiagInfo.InCount.ToString()))
                    .ForMember(d => d.BAH, opt => opt.MapFrom(s => s.Head.Number))
                     .ForMember(d => d.XM, opt => opt.MapFrom(s => s.BasicInfo.RealName))
                     .ForMember(d => d.XB, opt => opt.MapFrom(s => s.BasicInfo.Sex.ToString()))
                     .ForMember(d => d.CSRQ, opt => opt.MapFrom(s => s.BasicInfo.Year.ToString() + s.BasicInfo.Month.ToString() + s.BasicInfo.Day.ToString()))
                     .ForMember(d => d.NL, opt => opt.MapFrom(s => s.BasicInfo.Age))
                     .ForMember(d => d.GJ, opt => opt.MapFrom(s => s.BasicInfo.Coutry))
                     .ForMember(d => d.BZYZSNL, opt => opt.MapFrom(s => s.BasicInfo.Age_New))
                     .ForMember(d => d.XSECSTZ, opt => opt.MapFrom(s => s.BasicInfo.NewBornOutWeight))
                     .ForMember(d => d.XSERYTZ, opt => opt.MapFrom(s => s.BasicInfo.NewBornInWeight))
                     .ForMember(d => d.CSD, opt => opt.MapFrom(s => s.BasicInfo.BornAddr))
                     .ForMember(d => d.GG, opt => opt.MapFrom(s => s.BasicInfo.Origin))
                     .ForMember(d => d.MZ, opt => opt.MapFrom(s => s.BasicInfo.Nation))
                     .ForMember(d => d.SFZH, opt => opt.MapFrom(s => s.BasicInfo.CertNo))
                     .ForMember(d => d.ZY, opt => opt.MapFrom(s => s.BasicInfo.JobType))
                     .ForMember(d => d.HY, opt => opt.MapFrom(s => s.BasicInfo.Marriage))
                     .ForMember(d => d.MZ, opt => opt.MapFrom(s => s.BasicInfo.Nation))
                     .ForMember(d => d.XZZ, opt => opt.MapFrom(s => s.BasicInfo.HomeAddress))
                     .ForMember(d => d.DH, opt => opt.MapFrom(s => s.BasicInfo.ContactPhone))
                     .ForMember(d => d.YB1, opt => opt.MapFrom(s => s.BasicInfo.PostCode))
                     .ForMember(d => d.HKDZ, opt => opt.MapFrom(s => s.BasicInfo.Address))
                     .ForMember(d => d.YB2, opt => opt.MapFrom(s => s.BasicInfo.PostCode))
                     .ForMember(d => d.GZDWJDZ, opt => opt.MapFrom(s => s.BasicInfo.JobName))
                     .ForMember(d => d.DWDH, opt => opt.MapFrom(s => s.BasicInfo.JobPhone))
                     .ForMember(d => d.YB3, opt => opt.MapFrom(s => s.BasicInfo.JobPostCode))
                     .ForMember(d => d.LXRXM, opt => opt.MapFrom(s => s.BasicInfo.ContactName))
                     .ForMember(d => d.GX, opt => opt.MapFrom(s => s.BasicInfo.ContactType.ToString()))
                     .ForMember(d => d.DZ, opt => opt.MapFrom(s => s.BasicInfo.ContactAddress))
                     .ForMember(d => d.DH2, opt => opt.MapFrom(s => s.BasicInfo.ContactPhone))
                     .ForMember(d => d.RYTJ, opt => opt.MapFrom(s => s.DiagInfo.Way.ToString()))
                     .ForMember(d => d.RYSJ, opt => opt.MapFrom(s => s.DiagInfo.InTime.ToString("yyyyMMdd")))
                     .ForMember(d => d.RYSJS, opt => opt.MapFrom(s => s.DiagInfo.InTime.Hour))
                     .ForMember(d => d.RYKB, opt => opt.MapFrom(s => s.DiagInfo.InCategory))
                     .ForMember(d => d.RYBF, opt => opt.MapFrom(s => s.DiagInfo.InRoom))
                     .ForMember(d => d.ZKKB, opt => opt.MapFrom(s => s.DiagInfo.TurnCategory))
                     .ForMember(d => d.CYSJ, opt => opt.MapFrom(s => s.DiagInfo.OutTime.ToString("yyyyMMdd")))
                     .ForMember(d => d.CYSJS, opt => opt.MapFrom(s => s.DiagInfo.OutTime.Hour))
                     .ForMember(d => d.CYKB, opt => opt.MapFrom(s => s.DiagInfo.OutCategory))
                     .ForMember(d => d.CYBF, opt => opt.MapFrom(s => s.DiagInfo.OutRoom))
                     .ForMember(d => d.SJZYTS, opt => opt.MapFrom(s => s.DiagInfo.InDays))
                     .ForMember(d => d.MZZD, opt => opt.MapFrom(s => s.DiagInfo.In_WM_Diag))
                     .ForMember(d => d.JBBM, opt => opt.MapFrom(s => s.DiagInfo.In_WM_Code))
                     .ForMember(d => d.ZYZD, opt => opt.MapFrom(s => s.DiagInfo.DiagItems.Where(x => x.Type == 1 && x.Way == 1).Single().Name))
                     .ForMember(d => d.JBBM, opt => opt.MapFrom(s => s.DiagInfo.DiagItems.Where(x => x.Type == 1 && x.Way == 1).Single().Code))
                     .ForMember(d => d.RYBQ, opt => opt.MapFrom(s => s.DiagInfo.DiagItems.Where(x => x.Type == 1 && x.Way == 1).Single().Desc))

                     .ForMember(d => d.QTZD1, opt => { opt.PreCondition(s => s.DiagInfo.DiagItems.Count(x => x.Type == 2 && x.Way == 1) >= 1); opt.MapFrom(s => s.DiagInfo.DiagItems.Where(x => x.Type == 2 && x.Way == 1).ElementAt(0).Name); })
                     .ForMember(d => d.JBDM1, opt => { opt.PreCondition(s => s.DiagInfo.DiagItems.Count(x => x.Type == 2 && x.Way == 1) >= 1); opt.MapFrom(s => s.DiagInfo.DiagItems.Where(x => x.Type == 2 && x.Way == 1).ElementAt(0).Code); })
                     .ForMember(d => d.RYBQ1, opt => { opt.PreCondition(s => s.DiagInfo.DiagItems.Count(x => x.Type == 2 && x.Way == 1) >= 1); opt.MapFrom(s => s.DiagInfo.DiagItems.Where(x => x.Type == 2 && x.Way == 1).ElementAt(0).Desc); })

                     .ForMember(d => d.QTZD2, opt => { opt.PreCondition(s => s.DiagInfo.DiagItems.Count(x => x.Type == 2 && x.Way == 1) >= 2); opt.MapFrom(s => s.DiagInfo.DiagItems.Where(x => x.Type == 2 && x.Way == 1).ElementAt(1).Name); })
                     .ForMember(d => d.JBDM2, opt => { opt.PreCondition(s => s.DiagInfo.DiagItems.Count(x => x.Type == 2 && x.Way == 1) >= 2); opt.MapFrom(s => s.DiagInfo.DiagItems.Where(x => x.Type == 2 && x.Way == 1).ElementAt(1).Code); })
                     .ForMember(d => d.RYBQ2, opt => { opt.PreCondition(s => s.DiagInfo.DiagItems.Count(x => x.Type == 2 && x.Way == 1) >= 2); opt.MapFrom(s => s.DiagInfo.DiagItems.Where(x => x.Type == 2 && x.Way == 1).ElementAt(1).Desc); })

                     .ForMember(d => d.QTZD3, opt => { opt.PreCondition(s => s.DiagInfo.DiagItems.Count(x => x.Type == 2 && x.Way == 1) >= 3); opt.MapFrom(s => s.DiagInfo.DiagItems.Where(x => x.Type == 2 && x.Way == 1).ElementAt(2).Name); })
                     .ForMember(d => d.JBDM3, opt => { opt.PreCondition(s => s.DiagInfo.DiagItems.Count(x => x.Type == 2 && x.Way == 1) >= 3); opt.MapFrom(s => s.DiagInfo.DiagItems.Where(x => x.Type == 2 && x.Way == 1).ElementAt(2).Code); })
                     .ForMember(d => d.RYBQ3, opt => { opt.PreCondition(s => s.DiagInfo.DiagItems.Count(x => x.Type == 2 && x.Way == 1) >= 3); opt.MapFrom(s => s.DiagInfo.DiagItems.Where(x => x.Type == 2 && x.Way == 1).ElementAt(2).Desc); })

                     .ForMember(d => d.QTZD4, opt => { opt.PreCondition(s => s.DiagInfo.DiagItems.Count(x => x.Type == 2 && x.Way == 1) >= 4); opt.MapFrom(s => s.DiagInfo.DiagItems.Where(x => x.Type == 2 && x.Way == 1).ElementAt(3).Name); })
                     .ForMember(d => d.JBDM4, opt => { opt.PreCondition(s => s.DiagInfo.DiagItems.Count(x => x.Type == 2 && x.Way == 1) >= 4); opt.MapFrom(s => s.DiagInfo.DiagItems.Where(x => x.Type == 2 && x.Way == 1).ElementAt(3).Code); })
                     .ForMember(d => d.RYBQ4, opt => { opt.PreCondition(s => s.DiagInfo.DiagItems.Count(x => x.Type == 2 && x.Way == 1) >= 4); opt.MapFrom(s => s.DiagInfo.DiagItems.Where(x => x.Type == 2 && x.Way == 1).ElementAt(3).Desc); })

                     .ForMember(d => d.QTZD5, opt => { opt.PreCondition(s => s.DiagInfo.DiagItems.Count(x => x.Type == 2 && x.Way == 1) >= 5); opt.MapFrom(s => s.DiagInfo.DiagItems.Where(x => x.Type == 2 && x.Way == 1).ElementAt(4).Name); })
                     .ForMember(d => d.JBDM5, opt => { opt.PreCondition(s => s.DiagInfo.DiagItems.Count(x => x.Type == 2 && x.Way == 1) >= 5); opt.MapFrom(s => s.DiagInfo.DiagItems.Where(x => x.Type == 2 && x.Way == 1).ElementAt(4).Code); })
                     .ForMember(d => d.RYBQ5, opt => { opt.PreCondition(s => s.DiagInfo.DiagItems.Count(x => x.Type == 2 && x.Way == 1) >= 5); opt.MapFrom(s => s.DiagInfo.DiagItems.Where(x => x.Type == 2 && x.Way == 1).ElementAt(4).Desc); })

                     .ForMember(d => d.QTZD6, opt => { opt.PreCondition(s => s.DiagInfo.DiagItems.Count(x => x.Type == 2 && x.Way == 1) >= 6); opt.MapFrom(s => s.DiagInfo.DiagItems.Where(x => x.Type == 2 && x.Way == 1).ElementAt(5).Name); })
                     .ForMember(d => d.JBDM6, opt => { opt.PreCondition(s => s.DiagInfo.DiagItems.Count(x => x.Type == 2 && x.Way == 1) >= 6); opt.MapFrom(s => s.DiagInfo.DiagItems.Where(x => x.Type == 2 && x.Way == 1).ElementAt(5).Code); })
                     .ForMember(d => d.RYBQ6, opt => { opt.PreCondition(s => s.DiagInfo.DiagItems.Count(x => x.Type == 2 && x.Way == 1) >= 6); opt.MapFrom(s => s.DiagInfo.DiagItems.Where(x => x.Type == 2 && x.Way == 1).ElementAt(5).Desc); })

                     .ForMember(d => d.QTZD7, opt => { opt.PreCondition(s => s.DiagInfo.DiagItems.Count(x => x.Type == 2 && x.Way == 1) >= 7); opt.MapFrom(s => s.DiagInfo.DiagItems.Where(x => x.Type == 2 && x.Way == 1).ElementAt(6).Name); })
                     .ForMember(d => d.JBDM7, opt => { opt.PreCondition(s => s.DiagInfo.DiagItems.Count(x => x.Type == 2 && x.Way == 1) >= 7); opt.MapFrom(s => s.DiagInfo.DiagItems.Where(x => x.Type == 2 && x.Way == 1).ElementAt(6).Code); })
                     .ForMember(d => d.RYBQ7, opt => { opt.PreCondition(s => s.DiagInfo.DiagItems.Count(x => x.Type == 2 && x.Way == 1) >= 7); opt.MapFrom(s => s.DiagInfo.DiagItems.Where(x => x.Type == 2 && x.Way == 1).ElementAt(6).Desc); })

                     .ForMember(d => d.QTZD8, opt => { opt.PreCondition(s => s.DiagInfo.DiagItems.Count(x => x.Type == 2 && x.Way == 1) >= 8); opt.MapFrom(s => s.DiagInfo.DiagItems.Where(x => x.Type == 2 && x.Way == 1).ElementAt(7).Name); })
                     .ForMember(d => d.JBDM8, opt => { opt.PreCondition(s => s.DiagInfo.DiagItems.Count(x => x.Type == 2 && x.Way == 1) >= 8); opt.MapFrom(s => s.DiagInfo.DiagItems.Where(x => x.Type == 2 && x.Way == 1).ElementAt(7).Code); })
                     .ForMember(d => d.RYBQ8, opt => { opt.PreCondition(s => s.DiagInfo.DiagItems.Count(x => x.Type == 2 && x.Way == 1) >= 8); opt.MapFrom(s => s.DiagInfo.DiagItems.Where(x => x.Type == 2 && x.Way == 1).ElementAt(7).Desc); })

                     .ForMember(d => d.QTZD9, opt => { opt.PreCondition(s => s.DiagInfo.DiagItems.Count(x => x.Type == 2 && x.Way == 1) >= 9); opt.MapFrom(s => s.DiagInfo.DiagItems.Where(x => x.Type == 2 && x.Way == 1).ElementAt(8).Name); })
                     .ForMember(d => d.JBDM9, opt => { opt.PreCondition(s => s.DiagInfo.DiagItems.Count(x => x.Type == 2 && x.Way == 1) >= 9); opt.MapFrom(s => s.DiagInfo.DiagItems.Where(x => x.Type == 2 && x.Way == 1).ElementAt(8).Code); })
                     .ForMember(d => d.RYBQ9, opt => { opt.PreCondition(s => s.DiagInfo.DiagItems.Count(x => x.Type == 2 && x.Way == 1) >= 9); opt.MapFrom(s => s.DiagInfo.DiagItems.Where(x => x.Type == 2 && x.Way == 1).ElementAt(8).Desc); })

                     .ForMember(d => d.QTZD10, opt => { opt.PreCondition(s => s.DiagInfo.DiagItems.Count(x => x.Type == 2 && x.Way == 1) >= 10); opt.MapFrom(s => s.DiagInfo.DiagItems.Where(x => x.Type == 2 && x.Way == 1).ElementAt(9).Name); })
                     .ForMember(d => d.JBDM10, opt => { opt.PreCondition(s => s.DiagInfo.DiagItems.Count(x => x.Type == 2 && x.Way == 1) >= 10); opt.MapFrom(s => s.DiagInfo.DiagItems.Where(x => x.Type == 2 && x.Way == 1).ElementAt(9).Code); })
                     .ForMember(d => d.RYBQ10, opt => { opt.PreCondition(s => s.DiagInfo.DiagItems.Count(x => x.Type == 2 && x.Way == 1) >= 10); opt.MapFrom(s => s.DiagInfo.DiagItems.Where(x => x.Type == 2 && x.Way == 1).ElementAt(9).Desc); })


                     .ForMember(d => d.QTZD11, opt => { opt.PreCondition(s => s.DiagInfo.DiagItems.Count(x => x.Type == 2 && x.Way == 1) >= 11); opt.MapFrom(s => s.DiagInfo.DiagItems.Where(x => x.Type == 2 && x.Way == 1).ElementAt(10).Name); })
                     .ForMember(d => d.JBDM11, opt => { opt.PreCondition(s => s.DiagInfo.DiagItems.Count(x => x.Type == 2 && x.Way == 1) >= 11); opt.MapFrom(s => s.DiagInfo.DiagItems.Where(x => x.Type == 2 && x.Way == 1).ElementAt(10).Code); })
                     .ForMember(d => d.RYBQ11, opt => { opt.PreCondition(s => s.DiagInfo.DiagItems.Count(x => x.Type == 2 && x.Way == 1) >= 11); opt.MapFrom(s => s.DiagInfo.DiagItems.Where(x => x.Type == 2 && x.Way == 1).ElementAt(10).Desc); })

                     .ForMember(d => d.QTZD12, opt => { opt.PreCondition(s => s.DiagInfo.DiagItems.Count(x => x.Type == 2 && x.Way == 1) >= 12); opt.MapFrom(s => s.DiagInfo.DiagItems.Where(x => x.Type == 2 && x.Way == 1).ElementAt(11).Name); })
                     .ForMember(d => d.JBDM12, opt => { opt.PreCondition(s => s.DiagInfo.DiagItems.Count(x => x.Type == 2 && x.Way == 1) >= 12); opt.MapFrom(s => s.DiagInfo.DiagItems.Where(x => x.Type == 2 && x.Way == 1).ElementAt(11).Code); })
                     .ForMember(d => d.RYBQ12, opt => { opt.PreCondition(s => s.DiagInfo.DiagItems.Count(x => x.Type == 2 && x.Way == 1) >= 12); opt.MapFrom(s => s.DiagInfo.DiagItems.Where(x => x.Type == 2 && x.Way == 1).ElementAt(11).Desc); })

                     .ForMember(d => d.QTZD13, opt => { opt.PreCondition(s => s.DiagInfo.DiagItems.Count(x => x.Type == 2 && x.Way == 1) >= 13); opt.MapFrom(s => s.DiagInfo.DiagItems.Where(x => x.Type == 2 && x.Way == 1).ElementAt(12).Name); })
                     .ForMember(d => d.JBDM13, opt => { opt.PreCondition(s => s.DiagInfo.DiagItems.Count(x => x.Type == 2 && x.Way == 1) >= 13); opt.MapFrom(s => s.DiagInfo.DiagItems.Where(x => x.Type == 2 && x.Way == 1).ElementAt(12).Code); })
                     .ForMember(d => d.RYBQ13, opt => { opt.PreCondition(s => s.DiagInfo.DiagItems.Count(x => x.Type == 2 && x.Way == 1) >= 13); opt.MapFrom(s => s.DiagInfo.DiagItems.Where(x => x.Type == 2 && x.Way == 1).ElementAt(12).Desc); })

                     .ForMember(d => d.QTZD14, opt => { opt.PreCondition(s => s.DiagInfo.DiagItems.Count(x => x.Type == 2 && x.Way == 1) >= 14); opt.MapFrom(s => s.DiagInfo.DiagItems.Where(x => x.Type == 2 && x.Way == 1).ElementAt(13).Name); })
                     .ForMember(d => d.JBDM14, opt => { opt.PreCondition(s => s.DiagInfo.DiagItems.Count(x => x.Type == 2 && x.Way == 1) >= 14); opt.MapFrom(s => s.DiagInfo.DiagItems.Where(x => x.Type == 2 && x.Way == 1).ElementAt(13).Code); })
                     .ForMember(d => d.RYBQ14, opt => { opt.PreCondition(s => s.DiagInfo.DiagItems.Count(x => x.Type == 2 && x.Way == 1) >= 14); opt.MapFrom(s => s.DiagInfo.DiagItems.Where(x => x.Type == 2 && x.Way == 1).ElementAt(13).Desc); })

                     .ForMember(d => d.QTZD15, opt => { opt.PreCondition(s => s.DiagInfo.DiagItems.Count(x => x.Type == 2 && x.Way == 1) >= 15); opt.MapFrom(s => s.DiagInfo.DiagItems.Where(x => x.Type == 2 && x.Way == 1).ElementAt(14).Name); })
                     .ForMember(d => d.JBDM15, opt => { opt.PreCondition(s => s.DiagInfo.DiagItems.Count(x => x.Type == 2 && x.Way == 1) >= 15); opt.MapFrom(s => s.DiagInfo.DiagItems.Where(x => x.Type == 2 && x.Way == 1).ElementAt(14).Code); })
                     .ForMember(d => d.RYBQ15, opt => { opt.PreCondition(s => s.DiagInfo.DiagItems.Count(x => x.Type == 2 && x.Way == 1) >= 15); opt.MapFrom(s => s.DiagInfo.DiagItems.Where(x => x.Type == 2 && x.Way == 1).ElementAt(14).Desc); })

                     .ForMember(d => d.WBYY, opt => opt.MapFrom(s => s.DiagInfo.Poison))
                     .ForMember(d => d.H23, opt => opt.MapFrom(s => s.DiagInfo.PoisonCode))
                     .ForMember(d => d.BLZD, opt => opt.MapFrom(s => s.DiagInfo.Pathology))
                     .ForMember(d => d.JBMM, opt => opt.MapFrom(s => s.DiagInfo.PathologyCode))
                     .ForMember(d => d.BLH, opt => opt.MapFrom(s => s.DiagInfo.PathologyNo))
                     .ForMember(d => d.YWGM, opt => opt.MapFrom(s => s.DiagInfo.React))
                     .ForMember(d => d.GMYW, opt => opt.MapFrom(s => s.DiagInfo.ReactName))
                     .ForMember(d => d.SWHZSJ, opt => opt.MapFrom(s => s.DiagInfo.DeathCheck))
                     .ForMember(d => d.XX, opt => opt.MapFrom(s => s.DiagInfo.BloodType))
                     .ForMember(d => d.RH, opt => opt.MapFrom(s => s.DiagInfo.Rh))
                     .ForMember(d => d.KZR, opt => opt.MapFrom(s => s.PersonInfo.KZR))
                     .ForMember(d => d.ZRYS, opt => opt.MapFrom(s => s.PersonInfo.ZRYS))
                     .ForMember(d => d.ZZYS, opt => opt.MapFrom(s => s.PersonInfo.DcName))
                     .ForMember(d => d.ZYYS, opt => opt.MapFrom(s => s.PersonInfo.ZYYS))
                     .ForMember(d => d.ZRHS, opt => opt.MapFrom(s => s.PersonInfo.NurseName))
                     .ForMember(d => d.JXYS, opt => opt.MapFrom(s => s.PersonInfo.JXYS))
                     .ForMember(d => d.SXYS, opt => opt.MapFrom(s => s.PersonInfo.SXYS))
                     .ForMember(d => d.BMY, opt => opt.MapFrom(s => s.PersonInfo.BMY))
                     .ForMember(d => d.BAZL, opt => opt.MapFrom(s => s.DiagInfo.BAZL))
                     .ForMember(d => d.ZKYS, opt => opt.MapFrom(s => s.PersonInfo.ZKYS))
                     .ForMember(d => d.ZKHS, opt => opt.MapFrom(s => s.PersonInfo.ZKHS))
                     .ForMember(d => d.ZKRQ, opt => opt.MapFrom(s => s.DiagInfo.ZKRQ.ToString("yyyyMMdd")))

                     .ForMember(d => d.SSJCZBM1, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count > 0); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 1).Single().OperCode); })
                     .ForMember(d => d.SSJCZRQ1, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count > 0); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 1).Single().OperTime.ToString("yyyyMMdd")); })
                     .ForMember(d => d.SSJB1, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count > 0); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 1).Single().Level); })
                     .ForMember(d => d.SSJCZMC1, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count > 0); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 1).Single().OperName); })
                     .ForMember(d => d.SZ1, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count > 0); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 1).Single().SZ); })
                     .ForMember(d => d.YZ1, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count > 0); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 1).Single().YZ); })
                     .ForMember(d => d.EZ1, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count > 0); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 1).Single().EZ); })
                     .ForMember(d => d.QKDJ1, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count > 0); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 1).Single().CutType); })
                     .ForMember(d => d.QKYHLB1, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count > 0); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 1).Single().CutLevel); })
                     .ForMember(d => d.MZFS1, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count > 0); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 1).Single().Way); })


                     .ForMember(d => d.SSJCZBM1, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count(x => x.Type == 0) >= 1); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 0).ElementAt(0).OperCode); })
                     .ForMember(d => d.SSJCZRQ1, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count(x => x.Type == 0) >= 1); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 0).ElementAt(0).OperTime.ToString("yyyyMMdd")); })
                     .ForMember(d => d.SSJB1, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count(x => x.Type == 0) >= 1); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 0).ElementAt(0).Level); })
                     .ForMember(d => d.SSJCZMC1, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count(x => x.Type == 0) >= 1); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 0).ElementAt(0).OperName); })
                     .ForMember(d => d.SZ1, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count(x => x.Type == 0) >= 1); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 0).ElementAt(0).SZ); })
                     .ForMember(d => d.YZ1, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count(x => x.Type == 0) >= 1); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 0).ElementAt(0).YZ); })
                     .ForMember(d => d.EZ1, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count(x => x.Type == 0) >= 1); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 0).ElementAt(0).EZ); })
                     .ForMember(d => d.QKDJ1, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count(x => x.Type == 0) >= 1); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 0).ElementAt(0).CutType); })
                     .ForMember(d => d.QKYHLB1, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count(x => x.Type == 0) >= 1); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 0).ElementAt(0).CutLevel); })
                     .ForMember(d => d.MZFS1, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count(x => x.Type == 0) >= 1); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 0).ElementAt(0).Way); })

                     .ForMember(d => d.SSJCZBM2, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count(x => x.Type == 0) >= 2); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 0).ElementAt(1).OperCode); })
                     .ForMember(d => d.SSJCZRQ2, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count(x => x.Type == 0) >= 2); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 0).ElementAt(1).OperTime.ToString("yyyyMMdd")); })
                     .ForMember(d => d.SSJB2, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count(x => x.Type == 0) >= 2); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 0).ElementAt(1).Level); })
                     .ForMember(d => d.SSJCZMC2, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count(x => x.Type == 0) >= 2); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 0).ElementAt(1).OperName); })
                     .ForMember(d => d.SZ2, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count(x => x.Type == 0) >= 2); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 0).ElementAt(1).SZ); })
                     .ForMember(d => d.YZ2, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count(x => x.Type == 0) >= 2); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 0).ElementAt(1).YZ); })
                     .ForMember(d => d.EZ2, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count(x => x.Type == 0) >= 2); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 0).ElementAt(1).EZ); })
                     .ForMember(d => d.QKDJ2, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count(x => x.Type == 0) >= 2); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 0).ElementAt(1).CutType); })
                     .ForMember(d => d.QKYHLB2, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count(x => x.Type == 0) >= 2); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 0).ElementAt(1).CutLevel); })
                     .ForMember(d => d.MZFS2, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count(x => x.Type == 0) >= 2); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 0).ElementAt(1).Way); })

                     .ForMember(d => d.SSJCZBM3, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count(x => x.Type == 0) >= 3); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 0).ElementAt(2).OperCode); })
                     .ForMember(d => d.SSJCZRQ3, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count(x => x.Type == 0) >= 3); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 0).ElementAt(2).OperTime.ToString("yyyyMMdd")); })
                     .ForMember(d => d.SSJB3, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count(x => x.Type == 0) >= 3); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 0).ElementAt(2).Level); })
                     .ForMember(d => d.SSJCZMC3, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count(x => x.Type == 0) >= 3); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 0).ElementAt(2).OperName); })
                     .ForMember(d => d.SZ3, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count(x => x.Type == 0) >= 3); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 0).ElementAt(2).SZ); })
                     .ForMember(d => d.YZ3, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count(x => x.Type == 0) >= 3); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 0).ElementAt(2).YZ); })
                     .ForMember(d => d.EZ3, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count(x => x.Type == 0) >= 3); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 0).ElementAt(2).EZ); })
                     .ForMember(d => d.QKDJ3, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count(x => x.Type == 0) >= 3); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 0).ElementAt(2).CutType); })
                     .ForMember(d => d.QKYHLB3, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count(x => x.Type == 0) >= 3); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 0).ElementAt(2).CutLevel); })
                     .ForMember(d => d.MZFS3, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count(x => x.Type == 0) >= 3); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 0).ElementAt(2).Way); })

                     .ForMember(d => d.SSJCZBM4, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count(x => x.Type == 0) >= 4); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 0).ElementAt(3).OperCode); })
                     .ForMember(d => d.SSJCZRQ4, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count(x => x.Type == 0) >= 4); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 0).ElementAt(3).OperTime.ToString("yyyyMMdd")); })
                     .ForMember(d => d.SSJB4, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count(x => x.Type == 0) >= 4); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 0).ElementAt(3).Level); })
                     .ForMember(d => d.SSJCZMC4, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count(x => x.Type == 0) >= 4); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 0).ElementAt(3).OperName); })
                     .ForMember(d => d.SZ4, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count(x => x.Type == 0) >= 4); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 0).ElementAt(3).SZ); })
                     .ForMember(d => d.YZ4, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count(x => x.Type == 0) >= 4); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 0).ElementAt(3).YZ); })
                     .ForMember(d => d.EZ4, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count(x => x.Type == 0) >= 4); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 0).ElementAt(3).EZ); })
                     .ForMember(d => d.QKDJ4, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count(x => x.Type == 0) >= 4); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 0).ElementAt(3).CutType); })
                     .ForMember(d => d.QKYHLB4, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count(x => x.Type == 0) >= 4); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 0).ElementAt(3).CutLevel); })
                     .ForMember(d => d.MZFS4, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count(x => x.Type == 0) >= 4); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 0).ElementAt(3).Way); })


                     .ForMember(d => d.SSJCZBM5, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count(x => x.Type == 0) >= 5); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 0).ElementAt(4).OperCode); })
                     .ForMember(d => d.SSJCZRQ5, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count(x => x.Type == 0) >= 5); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 0).ElementAt(4).OperTime.ToString("yyyyMMdd")); })
                     .ForMember(d => d.SSJB5, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count(x => x.Type == 0) >= 5); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 0).ElementAt(4).Level); })
                     .ForMember(d => d.SSJCZMC5, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count(x => x.Type == 0) >= 5); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 0).ElementAt(4).OperName); })
                     .ForMember(d => d.SZ5, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count(x => x.Type == 0) >= 5); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 0).ElementAt(4).SZ); })
                     .ForMember(d => d.YZ5, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count(x => x.Type == 0) >= 5); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 0).ElementAt(4).YZ); })
                     .ForMember(d => d.EZ5, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count(x => x.Type == 0) >= 5); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 0).ElementAt(4).EZ); })
                     .ForMember(d => d.QKDJ5, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count(x => x.Type == 0) >= 5); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 0).ElementAt(4).CutType); })
                     .ForMember(d => d.QKYHLB5, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count(x => x.Type == 0) >= 5); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 0).ElementAt(4).CutLevel); })
                     .ForMember(d => d.MZFS5, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count(x => x.Type == 0) >= 5); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 0).ElementAt(4).Way); })

                     .ForMember(d => d.SSJCZBM6, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count(x => x.Type == 0) >= 6); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 0).ElementAt(5).OperCode); })
                     .ForMember(d => d.SSJCZRQ6, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count(x => x.Type == 0) >= 6); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 0).ElementAt(5).OperTime.ToString("yyyyMMdd")); })
                     .ForMember(d => d.SSJB6, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count(x => x.Type == 0) >= 6); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 0).ElementAt(5).Level); })
                     .ForMember(d => d.SSJCZMC6, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count(x => x.Type == 0) >= 6); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 0).ElementAt(5).OperName); })
                     .ForMember(d => d.SZ6, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count(x => x.Type == 0) >= 6); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 0).ElementAt(5).SZ); })
                     .ForMember(d => d.YZ6, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count(x => x.Type == 0) >= 6); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 0).ElementAt(5).YZ); })
                     .ForMember(d => d.EZ6, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count(x => x.Type == 0) >= 6); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 0).ElementAt(5).EZ); })
                     .ForMember(d => d.QKDJ6, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count(x => x.Type == 0) >= 6); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 0).ElementAt(5).CutType); })
                     .ForMember(d => d.QKYHLB6, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count(x => x.Type == 0) >= 6); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 0).ElementAt(5).CutLevel); })
                     .ForMember(d => d.MZFS6, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count(x => x.Type == 0) >= 6); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 0).ElementAt(5).Way); })

                     .ForMember(d => d.SSJCZBM7, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count(x => x.Type == 0) >= 7); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 0).ElementAt(6).OperCode); })
                     .ForMember(d => d.SSJCZRQ7, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count(x => x.Type == 0) >= 7); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 0).ElementAt(6).OperTime.ToString("yyyyMMdd")); })
                     .ForMember(d => d.SSJB7, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count(x => x.Type == 0) >= 7); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 0).ElementAt(6).Level); })
                     .ForMember(d => d.SSJCZMC7, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count(x => x.Type == 0) >= 7); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 0).ElementAt(6).OperName); })
                     .ForMember(d => d.SZ7, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count(x => x.Type == 0) >= 7); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 0).ElementAt(6).SZ); })
                     .ForMember(d => d.YZ7, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count(x => x.Type == 0) >= 7); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 0).ElementAt(6).YZ); })
                     .ForMember(d => d.EZ7, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count(x => x.Type == 0) >= 7); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 0).ElementAt(6).EZ); })
                     .ForMember(d => d.QKDJ7, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count(x => x.Type == 0) >= 7); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 0).ElementAt(6).CutType); })
                     .ForMember(d => d.QKYHLB7, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count(x => x.Type == 0) >= 7); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 0).ElementAt(6).CutLevel); })
                     .ForMember(d => d.MZFS7, opt => { opt.PreCondition(s => s.DiagInfo.OperItems.Count(x => x.Type == 0) >= 7); opt.MapFrom(s => s.DiagInfo.OperItems.Where(x => x.Type == 0).ElementAt(6).Way); })

                     .ForMember(d => d.LYFS, opt => opt.MapFrom(s => s.DiagInfo.OutWay.ToString()))
                     .ForMember(d => d.YZZY_JGMC, opt => opt.MapFrom(s => s.DiagInfo.OutWay_Dept))
                     .ForMember(d => d.WSY_JGMC, opt => { opt.PreCondition(s => s.DiagInfo.OutWay == 2); opt.MapFrom(s => s.DiagInfo.OutWay_Dept); })
                     .ForMember(d => d.WSY_JGMC, opt => { opt.PreCondition(s => s.DiagInfo.OutWay == 3); opt.MapFrom(s => s.DiagInfo.OutWay_Dept); })
                     .ForMember(d => d.ZZYJH, opt => opt.MapFrom(s => s.DiagInfo.OutAgainType.ToString()))
                     .ForMember(d => d.MD, opt => opt.MapFrom(s => s.DiagInfo.OutAgainType_Memo))
                     .ForMember(d => d.RYQ_T, opt => opt.MapFrom(s => s.DiagInfo.RYQ_T))
                     .ForMember(d => d.RYQ_XS, opt => opt.MapFrom(s => s.DiagInfo.RYQ_XS))
                     .ForMember(d => d.RYQ_FZ, opt => opt.MapFrom(s => s.DiagInfo.RYQ_FZ))
                     .ForMember(d => d.RYH_T, opt => opt.MapFrom(s => s.DiagInfo.RYH_T))
                     .ForMember(d => d.RYH_XS, opt => opt.MapFrom(s => s.DiagInfo.RYH_XS))
                     .ForMember(d => d.RYH_FZ, opt => opt.MapFrom(s => s.DiagInfo.RYH_FZ))
                     .ForMember(d => d.ZFY, opt => opt.MapFrom(s => s.ChargeInfo.Total))
                     .ForMember(d => d.ZFJE, opt => opt.MapFrom(s => s.ChargeInfo.ZFJE))
                     .ForMember(d => d.YLFUF, opt => opt.MapFrom(s => s.ChargeInfo.YBYLFWF))
                     .ForMember(d => d.ZLCZF, opt => opt.MapFrom(s => s.ChargeInfo.YBZLCZF))
                     .ForMember(d => d.HLF, opt => opt.MapFrom(s => s.ChargeInfo.HLF))
                     .ForMember(d => d.QTFY, opt => opt.MapFrom(s => s.ChargeInfo.QTFY))
                     .ForMember(d => d.BLZDF, opt => opt.MapFrom(s => s.ChargeInfo.BLZDF))
                     .ForMember(d => d.SYSZDF, opt => opt.MapFrom(s => s.ChargeInfo.SYSZDF))
                     .ForMember(d => d.YXXZDF, opt => opt.MapFrom(s => s.ChargeInfo.YXXZDF))
                     .ForMember(d => d.LCZDXMF, opt => opt.MapFrom(s => s.ChargeInfo.LCZDXMF))
                     .ForMember(d => d.FSSZLXMF, opt => opt.MapFrom(s => s.ChargeInfo.FSSZLXMF))
                     .ForMember(d => d.WLZLF, opt => opt.MapFrom(s => s.ChargeInfo.LCWLZLF))
                     .ForMember(d => d.SSZLF, opt => opt.MapFrom(s => s.ChargeInfo.SSZLF))
                     .ForMember(d => d.MAF, opt => opt.MapFrom(s => s.ChargeInfo.MZF))
                     .ForMember(d => d.SSF, opt => opt.MapFrom(s => s.ChargeInfo.SSF))
                     .ForMember(d => d.KFF, opt => opt.MapFrom(s => s.ChargeInfo.KFF))
                     .ForMember(d => d.ZYZLF, opt => opt.MapFrom(s => s.ChargeInfo.ZYZLF))
                     .ForMember(d => d.XYF, opt => opt.MapFrom(s => s.ChargeInfo.XYF))
                     .ForMember(d => d.KJYWF, opt => opt.MapFrom(s => s.ChargeInfo.KJYWF))
                     .ForMember(d => d.ZCYF, opt => opt.MapFrom(s => s.ChargeInfo.ZCYF))
                     .ForMember(d => d.ZCYF1, opt => opt.MapFrom(s => s.ChargeInfo.ZCYF1))
                     .ForMember(d => d.XF, opt => opt.MapFrom(s => s.ChargeInfo.XF))
                     .ForMember(d => d.BDBLZPF, opt => opt.MapFrom(s => s.ChargeInfo.BDBLZPF))
                     .ForMember(d => d.QDBLZPF, opt => opt.MapFrom(s => s.ChargeInfo.QDBLZPF))
                     .ForMember(d => d.NXYZLZPF, opt => opt.MapFrom(s => s.ChargeInfo.NXYZLZPF))
                     .ForMember(d => d.XBYZLZPF, opt => opt.MapFrom(s => s.ChargeInfo.XBYZLZPF))
                     .ForMember(d => d.HCYYCLF, opt => opt.MapFrom(s => s.ChargeInfo.JCCLF))
                     .ForMember(d => d.YYCLF, opt => opt.MapFrom(s => s.ChargeInfo.ZLCLF))
                     .ForMember(d => d.YCXYYCLF, opt => opt.MapFrom(s => s.ChargeInfo.SSCLF))
                     .ForMember(d => d.QTF, opt => opt.MapFrom(s => s.ChargeInfo.QTF));
        }

    }
}
